/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package sip;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;

/**
 *
 * @author arianareyessantiago
 */
public class History {

    static private String fileName = "HistoryLog.txt";
    private String lineOfText = "";    
    public String read(){
    
        File f = new File(fileName);
        if(f.exists())
        {   //reads in buffer form, instead of line by line
            try {
                BufferedReader historyFile = new BufferedReader(new FileReader(fileName));
                
                lineOfText = historyFile.readLine();
                return lineOfText;    
                
            }catch (IOException e) {
                System.out.println("ERROR:  Exception:  " + e.toString());
            }
    
        }
        return lineOfText;
    } 
}
   

